﻿using Contracts;
using Domain;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Entities
{
    [Table("Products")]
    public class ProductEntity : IEntity
    {
        public int Id { get; set; }

        [Required, StringLength(20), Index(IsUnique = true)]
        public string Code { get; set; }

        [Required, StringLength(200), Index(IsUnique = true)]
        public string Name { get; set; }

        [Required]
        public string PriceCurrency { get; set; }

        [DataType(DataType.Currency)]
        public decimal PriceAmount { get; set; }

        public int StockQuantity { get; set; }
    }
}
